package com.jiawang.core.response;

import com.jiawang.core.enums.HandlerEnum;
import com.jiawang.core.handler.AbstractBaseHandler;
import com.jiawang.core.servlet.RequestBaseServlet;
import com.jiawang.core.servlet.ResponseBaseServlet;

import javax.annotation.Resource;

/**
 * @author LiJiaWang
 * 创建时间: 11:46
 * 项目的名字: jio_writer_tomcat
 * <p style="color:#33CCFF">响应处理器</p>
 */
public class ResponseHandler extends AbstractBaseHandler {
    @Resource
    private RequestBaseServlet requestBaseServlet;

    @Resource
    private ResponseBaseServlet responseBaseServlet;
    @Override
    public void beginExecution() {
        this.specific(HandlerEnum.BASE);
    }

    @Override
    public void specific(HandlerEnum handlerEnum) {
        if (handlerEnum.name().equals(HandlerEnum.BASE.name())) {
            responseBaseServlet.setVersion(requestBaseServlet.getVersion());
            responseBaseServlet.setCode("");


        }
    }








}
